#ifndef _HEADER_WaterTank1_H
#include "WaterTank1.h"
#endif

//判断雨水箱是否为空，利用waterline得到状态
bool WaterTank1::isEmpty()
{
    isEmptyState = waterLine.getState() != LOW;
    return isEmptyState;
}

void WaterTank1::closeOutPump()
{
    this->outPump.close();
}
void WaterTank1::openOutPump()
{
    this->outPump.open();
}

void WaterTank1::toString(char* inStr)
{
    char tmp1[200],tmp2[200];
    outPump.toString(tmp1);
    waterLine.toString(tmp2);
    sprintf(inStr,"WaterTank1:{isEmptyState=%d,outPump=%s,waterLine=%s}",
        isEmptyState,tmp1,tmp2);
}
